<?php

declare(strict_types=1);

namespace Plugin\Attractions\Commerce\Model\Commerce_energy;

use Hyperf\Database\Model\SoftDeletes;
use Hyperf\DbConnection\Model\Model;

/**
 * @property int $id 主键ID
 * @property int $merchant_id 商户ID
 * @property string $consumption_month 能耗月份（格式：2024-01）
 * @property int $cost_type 费用类型：1-水费，2-电费，3-气费，4-其他
 * @property string $cost_usage 用量
 * @property string $cost_price 单价
 * @property string $cost_meter_reading 表读数
 * @property string $total_amount 总费用
 * @property int $payment_status 缴费状态：1-未缴费，2-已缴费
 * @property string $payment_date 缴费日期
 * @property int $payment_method 付款方式1-银行转账,2-微信支付,3-支付宝支付,4-现金,5-其他付款方式
 * @property string $invoice_id 发票号
 * @property string $meter_photos 抄表照片
 * @property string $bills_photos 账单照片
 * @property string $remark 备注
 * @property \Carbon\Carbon $created_at 
 * @property \Carbon\Carbon $updated_at 
 * @property string $deleted_at 
 */
class CommerceEnergy extends Model
{
    use SoftDeletes;
    /**
     * The table associated with the model.
     */
    protected ?string $table = 'commerce_energy';

    /**
     * The attributes that are mass assignable.
     */
    protected array $fillable = ['id', 'merchant_id', 'consumption_month', 'cost_type', 'cost_usage', 'cost_price', 'cost_meter_reading', 'total_amount', 'payment_status', 'payment_date', 'payment_method', 'invoice_id', 'meter_photos', 'bills_photos', 'remark', 'created_at', 'updated_at', 'deleted_at'];

    /**
     * The attributes that should be cast to native types.
     */
    protected array $casts = ['id' => 'integer', 'merchant_id' => 'integer', 'cost_type' => 'integer', 'cost_usage' => 'decimal:2', 'cost_price' => 'decimal:2', 'cost_meter_reading' => 'decimal:2', 'total_amount' => 'decimal:2', 'payment_status' => 'integer', 'payment_method' => 'integer', 'created_at' => 'datetime', 'updated_at' => 'datetime'];
}
